package com.blues.cedar.model;

import java.util.List;
import javax.persistence.*;

/**
 * 对象
 */
@Entity
@Table( name = "cd_entity" )
public class Component {
	private long entityId;
	private String name;
	private String caption;
	private String dbTable;
	private List<Property> properties;
	
	@Id
	@Column
	public long getEntityId() {
		return this.entityId;
	}
	public void setEntityId(long entityId) {
		this.entityId = entityId;
	}
	
	@Column
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column
	public String getCaption() {
		return this.caption;
	}
	public void setCaption(String caption) {
		this.caption = caption;
	}
	
	@Column
	public String getDbTable() {
		return this.dbTable;
	}
	public void setDbTable(String dbTable) {
		this.dbTable = dbTable;
	}
	
	public List<Property> getProperties() {
		return this.properties;
	}
	public void setProperties(List<Property> properties) {
		this.properties = properties;
	}
	
	public String toString() {
		return "Entity{entityId: " + entityId + 
				", name: " + name + 
				", caption: " + caption +
				", dbTable: " + dbTable + "}";
	}
}
